package com.sandy.gorm7

import grails.gorm.transactions.Transactional
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController

import java.text.SimpleDateFormat

@RestController
@RequestMapping(value = "/person")
@Transactional
class PersonController {

    @GetMapping('/init')
    Person add() {
        new Person(
                name:'wang',
                user:'sdf',
                userId:'dd',
                typeName: 'hhe'
        ).save()
    }

}
